#include <stdio.h>
int main(){
	int n,x;
	int a,b,c,k,l,m;
	scanf("%d\n",&n);
	for(int i=1;i<=n;i++){
		scanf("%d\n",&x);
		a = x/100000;b = x/10000%10;c = x/1000%10; 
		k = x/100%10;l = x/10%10;m = x%10;
		if(a+b+c==k+l+m){
			printf("You are lucky!\n");
		}else{
			printf("Wish you good luck.\n");
		}
	}return 0;
}
